﻿#include <QCoreApplication>

#include "meal.h"
#include "mealbuilder.h"
#include "submealbuildera.h"
#include "submealbuilderb.h"
#include "kfcwaiter.h"

int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);

    MealBuilder* builderA = new SubMealBuilderA();
    KFCWaiter* waiter = new KFCWaiter();
    waiter->setMealBuilder(builderA);
    Meal* meal = waiter->construct();
    meal->show();

    Meal* meal1 = waiter->construct();
    meal1->show();

    MealBuilder* builderB = new SubMealBuilderB();
    waiter->setMealBuilder(builderB);
    Meal* meal3 = waiter->construct();
    meal3->show();

    return a.exec();
}
